Make gtk-encode-symbolic-svg work for icons with dotted names
authorMatthias Clasen <mclasen@redhat.com>
Fri, 25 Nov 2016 13:55:33 +0000 (08:55 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 25 Nov 2016 13:55:33 +0000 (08:55 -0500)
We were producing org.symbolic.png from org.gnome.Recipes-symbolic.svg,
which is not useful. Look for the last dot in the original name, to
produce the expected org.gnome.Recipes-symbolic.symbolic.png instead.

gtk/encodesymbolic.c

index 42e8d9c93648acaab76b93ce5fd8c23f611b2b1b..e6d01dd5c201b244e057123ba5eb23795fb95895 100644 (file)
@@ -282,7 +282,7 @@ main (int argc, char **argv)
 
   basename = g_path_get_basename (path);
 
-  dot = strchr(basename, '.');
+  dot = strrchr (basename, '.');
   if (dot != NULL)
     *dot = 0;
   pngfile = g_strconcat (basename, ".symbolic.png", NULL);